package jjn.effective_java.chapter6.item38;

/**
 * @author Jiang Jining
 * @since 2023-05-08 23:24
 */
public enum ExtendedOperation implements Operation {
    EXP("^") {
        @Override
        public double apply(double x, double y) {
            return Math.pow(x, y);
        }
    }, REMAINDER("%") {
        @Override
        public double apply(double x, double y) {
            return x % y;
        }
    };
    
    private final String symbol;
    
    ExtendedOperation(final String symbol) {
        this.symbol = symbol;
    }
    
    @Override
    public double apply(double x, double y) {
        return 0;
    }
}
